<?php
$data = '';
foreach ($_POST as $key => $val)
{
    $content = empty($val)
        ? '(empty)'
        : $val;
    $data .= '<b>'.$key.': </b><br />'.$content.'<br />';
}
    

echo json_encode(array('success' => TRUE, 'data' => $data));
?>